package com.rightsidetech.mall.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * mall_integral_commodity
 * @author
 */
public class MallIntegralCommodity implements Serializable {
    /**
     * 主键
     */
    private Long id;

    /**
     * 基础商品id
     */
    private Long baseInfoId;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 划线价
     */
    private BigDecimal underlinedPrice;

    /**
     * 状态, -2下架 -1-已驳回 0-待提审 1-待审核 2-待上架 3-上架中 
     */
    private Byte commodityStatus;

    /**
     * 商品顺序
     */
    private Long commoditySort;

    /**
     * 商品名称
     */
    private String commodityName;

    /**
     * 规格json
     */
    private String specsJson;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 商品编码
     */
    private String code;

    /**
     * 规格编码
     */
    private String specsCode;

    /**
     * 是否爆款 0-不是 1-是
     */
    private Byte isPopular;

    /**
     * 品牌id
     */
    private Long brandId;

    /**
     * 分类id
     */
    private Long typeId;

    /**
     * 封面图
     */
    private String cover;

    /**
     * 规格
     */
    private String specs;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 创建人
     */
    private String createrName;

    /**
     * 创建人id
     */
    private Long createrId;

    /**
     * 修改人id
     */
    private Long updaterId;

    /**
     * 修改人
     */
    private String updaterName;

    /**
     * 修改时间
     */
    private Date updatedAt;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getBaseInfoId() {
        return baseInfoId;
    }

    public void setBaseInfoId(Long baseInfoId) {
        this.baseInfoId = baseInfoId;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getUnderlinedPrice() {
        return underlinedPrice;
    }

    public void setUnderlinedPrice(BigDecimal underlinedPrice) {
        this.underlinedPrice = underlinedPrice;
    }

    public Byte getCommodityStatus() {
        return commodityStatus;
    }

    public void setCommodityStatus(Byte commodityStatus) {
        this.commodityStatus = commodityStatus;
    }

    public Long getCommoditySort() {
        return commoditySort;
    }

    public void setCommoditySort(Long commoditySort) {
        this.commoditySort = commoditySort;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getSpecsJson() {
        return specsJson;
    }

    public void setSpecsJson(String specsJson) {
        this.specsJson = specsJson;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getSpecsCode() {
        return specsCode;
    }

    public void setSpecsCode(String specsCode) {
        this.specsCode = specsCode;
    }

    public Byte getIsPopular() {
        return isPopular;
    }

    public void setIsPopular(Byte isPopular) {
        this.isPopular = isPopular;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getSpecs() {
        return specs;
    }

    public void setSpecs(String specs) {
        this.specs = specs;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public String getCreaterName() {
        return createrName;
    }

    public void setCreaterName(String createrName) {
        this.createrName = createrName;
    }

    public Long getCreaterId() {
        return createrId;
    }

    public void setCreaterId(Long createrId) {
        this.createrId = createrId;
    }

    public Long getUpdaterId() {
        return updaterId;
    }

    public void setUpdaterId(Long updaterId) {
        this.updaterId = updaterId;
    }

    public String getUpdaterName() {
        return updaterName;
    }

    public void setUpdaterName(String updaterName) {
        this.updaterName = updaterName;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MallIntegralCommodity other = (MallIntegralCommodity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getBaseInfoId() == null ? other.getBaseInfoId() == null : this.getBaseInfoId().equals(other.getBaseInfoId()))
                && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
                && (this.getUnderlinedPrice() == null ? other.getUnderlinedPrice() == null : this.getUnderlinedPrice().equals(other.getUnderlinedPrice()))
                && (this.getCommodityStatus() == null ? other.getCommodityStatus() == null : this.getCommodityStatus().equals(other.getCommodityStatus()))
                && (this.getCommoditySort() == null ? other.getCommoditySort() == null : this.getCommoditySort().equals(other.getCommoditySort()))
                && (this.getCommodityName() == null ? other.getCommodityName() == null : this.getCommodityName().equals(other.getCommodityName()))
                && (this.getSpecsJson() == null ? other.getSpecsJson() == null : this.getSpecsJson().equals(other.getSpecsJson()))
                && (this.getStock() == null ? other.getStock() == null : this.getStock().equals(other.getStock()))
                && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
                && (this.getSpecsCode() == null ? other.getSpecsCode() == null : this.getSpecsCode().equals(other.getSpecsCode()))
                && (this.getIsPopular() == null ? other.getIsPopular() == null : this.getIsPopular().equals(other.getIsPopular()))
                && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
                && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
                && (this.getCover() == null ? other.getCover() == null : this.getCover().equals(other.getCover()))
                && (this.getSpecs() == null ? other.getSpecs() == null : this.getSpecs().equals(other.getSpecs()))
                && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
                && (this.getCreaterName() == null ? other.getCreaterName() == null : this.getCreaterName().equals(other.getCreaterName()))
                && (this.getCreaterId() == null ? other.getCreaterId() == null : this.getCreaterId().equals(other.getCreaterId()))
                && (this.getUpdaterId() == null ? other.getUpdaterId() == null : this.getUpdaterId().equals(other.getUpdaterId()))
                && (this.getUpdaterName() == null ? other.getUpdaterName() == null : this.getUpdaterName().equals(other.getUpdaterName()))
                && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBaseInfoId() == null) ? 0 : getBaseInfoId().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getUnderlinedPrice() == null) ? 0 : getUnderlinedPrice().hashCode());
        result = prime * result + ((getCommodityStatus() == null) ? 0 : getCommodityStatus().hashCode());
        result = prime * result + ((getCommoditySort() == null) ? 0 : getCommoditySort().hashCode());
        result = prime * result + ((getCommodityName() == null) ? 0 : getCommodityName().hashCode());
        result = prime * result + ((getSpecsJson() == null) ? 0 : getSpecsJson().hashCode());
        result = prime * result + ((getStock() == null) ? 0 : getStock().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getSpecsCode() == null) ? 0 : getSpecsCode().hashCode());
        result = prime * result + ((getIsPopular() == null) ? 0 : getIsPopular().hashCode());
        result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getCover() == null) ? 0 : getCover().hashCode());
        result = prime * result + ((getSpecs() == null) ? 0 : getSpecs().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getCreaterName() == null) ? 0 : getCreaterName().hashCode());
        result = prime * result + ((getCreaterId() == null) ? 0 : getCreaterId().hashCode());
        result = prime * result + ((getUpdaterId() == null) ? 0 : getUpdaterId().hashCode());
        result = prime * result + ((getUpdaterName() == null) ? 0 : getUpdaterName().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", baseInfoId=").append(baseInfoId);
        sb.append(", price=").append(price);
        sb.append(", underlinedPrice=").append(underlinedPrice);
        sb.append(", commodityStatus=").append(commodityStatus);
        sb.append(", commoditySort=").append(commoditySort);
        sb.append(", commodityName=").append(commodityName);
        sb.append(", specsJson=").append(specsJson);
        sb.append(", stock=").append(stock);
        sb.append(", code=").append(code);
        sb.append(", specsCode=").append(specsCode);
        sb.append(", isPopular=").append(isPopular);
        sb.append(", brandId=").append(brandId);
        sb.append(", typeId=").append(typeId);
        sb.append(", cover=").append(cover);
        sb.append(", specs=").append(specs);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", createrName=").append(createrName);
        sb.append(", createrId=").append(createrId);
        sb.append(", updaterId=").append(updaterId);
        sb.append(", updaterName=").append(updaterName);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}